package commands;

import items.Item;

import java.util.ArrayList;

public class MoveItem extends Command
{
  private ArrayList<Item> fromList;
  private ArrayList<Item> toList;
  private Item item;
  
  public MoveItem(ArrayList<Item> fromList, ArrayList<Item> toList, Item item)
  {
    this.fromList = fromList;
    this.toList = toList;
    this.item = item;
  }
  
  public String run()
  {
    fromList.remove(item);
    toList.add(item);
    return "";
  }

}
